package cn.tedu.crm.permission.controller;

import cn.tedu.crm.base.response.JsonResult;
import cn.tedu.crm.permission.pojo.vo.MenuTreeVO;
import cn.tedu.crm.permission.pojo.vo.PermissionVO;
import cn.tedu.crm.permission.service.PermissionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/api/sys/menus")
public class PermissionController {

    @Autowired
    private PermissionService permissionService;


    @GetMapping("select")
    public JsonResult<List<MenuTreeVO>> selectPermission( ) {
        return JsonResult.success(permissionService.selectPermission());
    }

}
